<div class="left">
    <?php $this->widget("AdminDudoan")?>
</div>
<form method="get" action="" name="lichsu-form" id = "lichsu-form">
    <div class="right-main">
        <div class="righ-cont">
            <div class="right">
                <div class="title_style"> <span><b>Lịch sử dự đoán</b></span></div>
                <div class="tool clearfix">
                    <table cellspacing="0" cellpadding="0" border="0" width="100%">
                        <tbody>
                            <tr>
                                <td width="110" class="text-right"><label>Từ ngày:</label></td>
                                <td width="100">
                                    <?php        
                                        $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                                        'id'=>'from',
                                        'name'=>'from',
                                        'value'=>isset($_GET['from'])?$_GET['from']:date('d-m-Y',time()), 
                                        'options'=>array(
                                        'showAnim'=>'fold',
                                        'dateFormat'=>'dd-mm-yy',
                                        ),
                                        'htmlOptions'=>array(
                                        'readonly'=>'readonly',
                                        ),
                                        ));

                                    ?>
                                </td>
                                <td width="80" class="text-right"><label>Đến ngày:</label></td>
                                <td width="100">
                                    <?php        
                                        $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                                        'id'=>'to',
                                        'name'=>'to',
                                        'value'=>isset($_GET['to'])?$_GET['to']:date('d-m-Y',time()), 
                                        'options'=>array(
                                        'showAnim'=>'fold',
                                        'dateFormat'=>'dd-mm-yy',
                                        ),
                                        'htmlOptions'=>array(
                                        'readonly'=>'readonly',
                                        ),
                                        ));

                                    ?>
                                </td>
                                <td><input type="submit" value="Tìm kiếm"></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <?php if($count_row > 0){?>
                    <?php for($i = 0; $i < $count_row; $i++):?>
                        <div class="bottom15">
                            <p><strong class="s14">Dự đoán kết quả xổ số <?=DateUtils::convertToThu(strtotime($date[$i]['date']))?> - <?=DateUtils::convertDateweb($date[$i]['date'])?></strong></p>
                            <div class="table clearfix">
                                <table width="100%" cellspacing="0" cellpadding="0" border="0">
                                    <tbody>
                                        <tr class="bg_gray">
                                            <td width="30%" class="text-left"><strong>Tỉnh</strong></td>
                                            <td width="70%"><strong>Bộ số dự đoán</strong></td>
                                        </tr>
                                        <?php for($j = 0; $j < count($row[$i]); $j++){?>
                                            <tr>
                                                <td class="text-left"><a><?=$row[$i][$j]['province_name']?></a></td>
                                                <td><a><?=$row[$i][$j]['content']?></a></td>
                                            </tr>
                                            <?php }?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <?php endfor; ?>
                    <div class="fillters clearfix">
                        <ul class="paging fr">
                            <li><span class="nomal"><b><?php echo isset($page)?$page:"";?></b></span></a></li>       
                        </ul>
                    </div>
                    <?php }else{?>
                    <p align="center"><strong>Không tìm thấy dữ liệu!</strong></p>
                    <?php }?>

            </div>
        </div>
        <!-- End main--> 
    </div>
</form>
